package com.smallrig.mall.template.liteflow;

import com.yomahub.liteflow.core.FlowExecutor;
import com.yomahub.liteflow.flow.LiteflowResponse;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class YourClass{
    
    @Resource
    private FlowExecutor flowExecutor;
    
    public void testConfig(){
        LiteContext liteContext = LiteContext.builder().age(1).build();

        LiteflowResponse response = flowExecutor
                .execute2Resp("chain1", liteContext,LiteContext.class);

//        LiteflowResponse response = flowExecutor
//        .execute2Resp("chain1", null, liteContext);

        System.out.println(response);
    }
}
